@extends('layouts.master')

@section('title')
    消息模块——木投网商城管理后台
@stop

@section('app_css')
    <link href="/resource/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/resource/css/style.css">
    <link rel="stylesheet" href="/resource/css/dataTables.bootstrap.css">
@stop

@section('app_js')
    <script src="/resource/js/jquery-1.11.3.min.js"></script>
    <script src="/resource/js/bootstrap.min.js"></script>
    <script src="/resource/js/jquery.dataTables.min.js"></script>
    <script src="/resource/js/dataTables.bootstrap.min.js"></script>
    <script src="/resource/js/jquery.twbsPagination.js"></script>
    <script src="/resource/js/date.js"></script>
    <script>
        /*date*/
        var c = new Calendar("c");
        document.write(c);
        /*全选*/
        $(function () {
            $("#all").click(function () {
                var checked_status = this.checked;
                $("input[name=demo]").each(function () {
                    this.checked = checked_status;
                });
            });
        });
    </script>
@stop

@section('content')
    @include('common.nav')
<div class="container-fluid">
    <div class="row" id="navLeft">
        @include('common.other_nav')
        <div class="col-lg-10">
            <div class="navbottom">
              <span>您的位置：</span>其他 > 消息
            </div>
            <div class="contentNav">
              <ul>
                <li>消息</li>
                <li class="btn btn-default active"><a href="/show_notice">列表</a></li>
                <li class="btn btn-default"><a href="/add_notice">新增</a></li>
              </ul>
            </div>
            <hr>
            <div class="contentMember">
              <table class="table table-striped table-bordered bootstrap-datatable datatable table-hover" id="example">
                <thead>
                  <tr>
                    <th></th>
                    <th>消息名称</th>
                    <th>消息分类</th>
                    <th>发表日期</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                  @foreach($notices as $k => $notice)
                  <tr>
                    <td><input type="checkbox" name="demo"></td>
                    <td>{{ $notice->title }}</td>
                    <td>{{ $notice->type }}</td>
                    <td>{{ $notice->created }}</td>
                    <td><a href="/edit_notice?notice_id={{ $notice->notice_id }}">编辑</a> | <a href="/delete_notice?notice_id={{ $notice->notice_id }}">删除</a></td>
                  </tr>
                      @endforeach
                </tbody>
              </table>
            </div>
            {{ $notices->links() }}
        </div>
    </div>
</div>
@stop